package com.tuanzi.loan.web.bean.product.product;

import static com.tuanzi.loan.business.constants.DictionaryCode.*;

import java.lang.reflect.InvocationTargetException;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import javax.annotation.PostConstruct;
import javax.faces.bean.ViewScoped;

import com.base.common.util.RandomUtils;
import com.tuanzi.loan.business.constants.product.LoanProductDeviceType;
import com.tuanzi.loan.business.entity.CurrentUser;
import com.tuanzi.loan.business.entity.common.CommProductChannel;
import com.tuanzi.loan.business.entity.common.CommProductId;
import com.tuanzi.loan.business.entity.product.prefilter.LoanProductPrefilter;
import com.tuanzi.loan.business.entity.product.product.LoanApiFicoTagRecord;
import com.tuanzi.loan.business.entity.product.product.LoanApiInfo;
import com.tuanzi.loan.business.entity.product.product.LoanProductConsumeRecord;
import com.tuanzi.loan.business.entity.product.product.LoanProductRechargeRecord;
import com.tuanzi.loan.business.repository.product.product.LoanProductRechargeRecordRepository;
import com.tuanzi.loan.business.service.common.CommProductChannelService;
import com.tuanzi.loan.business.service.common.CommProductIdService;
import com.tuanzi.loan.business.service.product.prefilter.LoanProductPrefilterService;
import com.tuanzi.loan.business.service.product.product.LoanApiFicoTagRecordService;
import com.tuanzi.loan.business.service.product.product.LoanApiInfoService;
import com.tuanzi.loan.business.service.product.product.LoanProductConsumeRecordService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.vo.LoanProductOnlineRule;
import com.tuanzi.loan.vo.LoanProductUserTag;
import com.tuanzi.loan.vo.request.product.product.LoanProductConsumeSearchRequest;
import com.tuanzi.loan.vo.response.product.product.LoanProductConsumeSearchResponse;
import com.tuanzi.loan.vo.view.family.ActivityModelView;
import com.tuanzi.loan.vo.view.product.*;
import com.tuanzi.loan.web.configuration.JSFListingBean;
import com.tuanzi.loan.web.lazy.product.product.LoanProductConsumeRecordModelLazyDataModel;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.joda.time.DateTime;
import org.primefaces.event.FileUploadEvent;
import org.primefaces.event.TabChangeEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.gson.Gson;
import com.starbaba.tools.sequence.IntUtil;
import com.tuanzi.loan.business.entity.family.ActivityModel;
import com.tuanzi.loan.business.entity.family.ApiActivity;
import com.tuanzi.loan.business.entity.family.ContentActivity;
import com.tuanzi.loan.business.entity.settlement.CompanyInfo;
import com.tuanzi.loan.business.entity.shortlink.ShortLink;
import com.tuanzi.loan.business.service.family.ActivityModelService;
import com.tuanzi.loan.business.service.family.ApiActivityService;
import com.tuanzi.loan.business.service.family.ContentActivityService;
import com.tuanzi.loan.business.service.product.product.LoanProductInfoService;
import com.tuanzi.loan.business.service.product.space.LoanProductSpaceService;
import com.tuanzi.loan.business.service.settlement.CompanyInfoService;
import com.tuanzi.loan.business.service.shortlink.ShortLinkService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.exception.ValidateException;
import com.tuanzi.loan.vo.SpaceDetails;
import com.tuanzi.loan.web.configuration.JSFInfoBean;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Ray 2017/09/21
 */
@Data
@Debug
@Component
@ViewScoped
@EqualsAndHashCode(callSuper = true)
public class LoanProductInfoBean extends JSFInfoBean<LoanProductInfoView> {

	private static final long serialVersionUID = -2152778554108785342L;
	@Autowired
	private ContentActivityService contentActivityService;
	@Autowired
	private ApiActivityService apiActivityService;
	@Autowired
	private LoanProductInfoService loanProductInfoService;
	@Autowired
	private CompanyInfoService companyInfoService;
	@Autowired
	private ActivityModelService activityModelService;
	@Autowired
	private LoanProductSpaceService loanProductSpaceService;
	@Autowired
	private ShortLinkService shortLinkService;
	@Autowired
	private LoanProductPrefilterService productPrefilterService;
	@Autowired
	private CommProductIdService commProductIdService;
	@Autowired
	private CommProductChannelService commProductChannelService;

	@Autowired
	private LoanApiInfoService loanApiInfoService;

	@Autowired
	private ActivityModelService modelService;
	@Autowired
	private LoanProductRechargeRecordRepository rechargeRecordRepository;
	@Autowired
    private LoanProductConsumeRecordService consumeRecordService;
	@Autowired
	private LoanApiFicoTagRecordService loanApiFicoTagRecordService;

	private List<ActivityModel> activityModels;
	private List<ContentActivity> contentActivities;
	private List<ApiActivity> apiActivities;
	private List<CompanyInfo> companyList;
	private ActivityModelRequest activityModelRequest;
	private LoanProductTopic.LoanTopicInfo productTopic;
	private List<LoanProductPrefilter> loanProductPrefilters;
	private List<CommProductId> commProductIds;
	private List<CommProductChannel> commProductChannels;
	private Integer lastSelectChannel;
	private List<LoanApiInfo> loanApiInfos;
	private List<LoanProductRechargeRecord> rechargeRecordList;
    private LoanProductRechargeRecordView newRecharge;
    private List<LoanProductConsumeRecord> loanProductConsumeRecords;
    private double balance;
    private boolean addRechargeRecord = true;
    private List<LoanProductUserTag> userTags;

	@PostConstruct
	private void init() {
		activityModelRequest = new ActivityModelRequest();
		activityModels = activityModelService.findAll();
		String id = getParamFromRequest("id");
		if (StringUtils.isNotBlank(id)) {
			Long productInfoId = NumberUtils.toLong(id);
			$ = loanProductInfoService.loadProductInfoView(productInfoId);
			activityModelRequest.setActivityModelId($.getActivityModelId());
			rechargeRecordList = rechargeRecordRepository.findAllByProductId(productInfoId);
			if (rechargeRecordList == null){
				rechargeRecordList = new ArrayList<>();
			}
            loanProductConsumeRecords = consumeRecordService.findAllByProid(productInfoId);
			Integer clickUv = loanProductInfoService.getClickUv(productInfoId, LocalDate.now());
			balance = loanProductInfoService.getBalance(productInfoId, clickUv);
			onSelectParentProd();
		} else {
			$ = new LoanProductInfoView();
			$.setLoanProductTopic(new LoanProductTopic());
			$.getLoanProductTopic().setTopicInfos(Lists.newArrayList());
			$.setProductJoinedLimit(new LoanProductJoinedLimit());
			$.setSelectedPlatforms(Arrays.asList("ios", "android"));
			$.setOpenType(0);
			$.setRedirectType(1);
			$.setDayLimitClickUv(50000);
			LoanProductOnlineRule onlineRule = new LoanProductOnlineRule();
			onlineRule.setDevice(Lists.newArrayList(LoanProductDeviceType.OLD_USER.getType(), LoanProductDeviceType.NEW_USER.getType()));
			$.setOnlineRule(onlineRule);
			DateTime now = DateTime.now();
			$.setEveryDayOnlineTime(new DateTime(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), 0, 0, 0).plusSeconds(0).toDate());
			activityModelRequest.setActivityModelId(activityModels.get(0).getId());
			commProductIds = loadCommProductIds(commProductIdService.findAll());
			commProductChannels = commProductChannelService.findAll();
			lastSelectChannel = null;
			onChangeActivityModel();
			changeStatusToAdd();
		}
		loanProductPrefilters = productPrefilterService.findAll();
		apiActivities = apiActivityService.findAll();
		contentActivities = contentActivityService.findAll();
		productTopic = new LoanProductTopic.LoanTopicInfo();
		companyList = companyInfoService.findAllCompanyName();
		loanApiInfos = loanApiInfoService.findAll();
        newRecharge = new LoanProductRechargeRecordView();
		userTags = loanApiFicoTagRecordService.findUserTags();
		fillProductWelfareTopic();
	}

	public List<CommProductId> loadCommProductIds(List<CommProductId> all){
		if (all != null){
			return all.stream().filter(x -> x.getRealPrdid() != null).collect(Collectors.toList());
		}else {
			return new ArrayList<>();
		}
	}

	public void convertShortLink() {
		if (StringUtils.startsWith($.getUrl(), "http://tcir.cn/")) {
			throw new ValidateException("链接已转成为短连接");
		}

		ShortLink shortLink = new ShortLink();
		shortLink.setCtime(new Date());
		shortLink.setUrl($.getUrl());
		shortLink.setMemo($.getName());
		shortLink.setActivity("菠萝贷");
		shortLink.setEnvironment(1);
		shortLink.setIsUsedLink(1);
		String slink = RandomUtils.getRandomMixString(new Random().nextInt(2) + 4);
		shortLink.setShortLink(slink);
		shortLinkService.saveOrUpdate(shortLink);


		$.setUrl("http://tcir.cn/" + shortLink.getShortLink());
	}

	public void onSave() {
		if (!validation() || !validationModelContent()) {
			return;
		}
		setDefaultValue();
		loanProductInfoService.saveOrUpdateProductInfoView($);
		changeStatusToView();
		addSuccessfullyMessage();
	}

	public void setDefaultValue(){
		if ($.getApi() == null)
			$.setApi(0);
		if ($.getUnionType() == null)
			$.setUnionType(0);
		if ($.getSelectedPlatforms() == null || $.getSelectedPlatforms().size() <= 0) {
			$.setPlatform("all");
		}else{
			if ($.getSelectedPlatforms().size() > 1)
				$.setPlatform("all");
			else{
				$.setPlatform($.getSelectedPlatforms().get(0));
			}
		}
		if (StringUtils.isEmpty($.getReceiptModelId()))
			$.setReceiptModelId("0");
		if (StringUtils.isEmpty($.getReceiptProductId()))
			$.setReceiptProductId("0");
	}

	public void onCopyProduct() {
		$.setProductInfoId(null);
		$.setModelId(null);
		changeStatusToEdit();
	}

	public void onUploadBusinessLicense(FileUploadEvent event) {
		$.setBusinessLicense(this.uploadImg(event.getFile()));
	}

	public void onUploadLogo(FileUploadEvent event) {
		$.setLogo(this.uploadImg(event.getFile()));
	}

	public void onUploadLogoPic(FileUploadEvent event) {
		$.setLogo(this.uploadImg(event.getFile()));
	}


	public void onUploadMarketTag(FileUploadEvent event) {
		$.setMarketTag(this.uploadImg(event.getFile()));
	}

	public void onAddRow(int index) {
		$.getLoanProductModelViews().get(index).getOneListObjects().add(new LoanProductModelView.OneListObject());
	}

	public void onChangeActivityModel() {
		if (null == activityModelRequest.getActivityModelId()) {
			return;
		}
		activityModelRequest.setContentActivityId($.getModelId() == null ? -1L : $.getModelId());
		$.setActivityModelId(activityModelRequest.getActivityModelId());
		List<LoanProductModelView> loanProductModelViews = contentActivityService.loadActivityModelView(activityModelRequest.getActivityModelId(), activityModelRequest.getContentActivityId());
		$.setLoanProductModelViews(loanProductModelViews);
	}

	public void onUploadImageText(FileUploadEvent event) {
		Integer index = (Integer) event.getComponent().getAttributes().get("uploadIndex");
		if (null == index) {
			return;
		}

		String url = this.uploadImg(event.getFile());
		$.getLoanProductModelViews().get(index).setImgTextUrl(url);
	}

	public void onUploadImage(FileUploadEvent event) {
		Integer index = (Integer) event.getComponent().getAttributes().get("uploadIndex");
		if (null == index) {
			return;
		}

		String url = this.uploadImg(event.getFile());
		$.getLoanProductModelViews().get(index).setImgUrl(url);
	}

	public void onSelectAllProduct() {
		if (CollectionUtils.isEmpty($.getSelectedOnlineProducts()) || $.getSelectedOnlineProducts().size() < getCommProductIds().size()) {
			$.setSelectedOnlineProducts(getCommProductIds().stream().map(product -> product.getProductId().toString()).collect(Collectors.toSet()));
		} else {
			$.getSelectedOnlineProducts().clear();
		}
	}

	public void onSelectParentProd(){
		if (!StringUtils.isEmpty($.getParentProd())){
			commProductIds = loadCommProductIds(commProductIdService.findAllByParentId($.getParentProd()));
		}else{
			commProductIds = loadCommProductIds(commProductIdService.findAll());
		}
		setChannelListByProds(commProductIds);
	}

	public void setChannelListByProds(List<CommProductId> commProductIds){
		if (commProductIds == null || commProductIds.size() <= 0){
			if (commProductChannels != null){
				commProductChannels.clear();
			}
		}else{
			commProductChannels = commProductChannelService.findAll();
			List<Integer> prodCollect = commProductIds.stream().map(product -> product.getProductId()).collect(Collectors.toList());
			List<CommProductChannel> collect = commProductChannels.stream().filter(item -> prodCollect.contains(item.getProductId())).collect(Collectors.toList());
			commProductChannels = collect;
		}
	}

	public void onSelectAllExcludeChannel() {
		Set<String> collect = getCommProductChannels().stream().map(channel -> channel.getChannelCode().toString()).collect(Collectors.toSet());
		if (CollectionUtils.isEmpty($.getSelectedExcludeChannels()) || $.getSelectedExcludeChannels().size() < collect.size()) {
			$.setSelectedExcludeChannels(collect);
		} else {
			$.getSelectedExcludeChannels().clear();
		}
	}

	public void onSelectChannelGroupExcludeChannel(Integer channelGroup) {
		if ($.getSelectedExcludeChannels() == null) {
			$.setSelectedExcludeChannels(Sets.newHashSet());
		}
		if (lastSelectChannel != null && lastSelectChannel == channelGroup){ //取消选中
			$.getSelectedExcludeChannels().removeAll(getCommProductChannels().stream().filter(x -> (x.getChannelGroup() != null && x.getChannelGroup().intValue() == channelGroup))
					.map(channel -> channel.getChannelCode().toString()).collect(Collectors.toSet()));
			lastSelectChannel = null;
		}else{
			$.getSelectedExcludeChannels().addAll(getCommProductChannels().stream().filter(x -> (x.getChannelGroup() != null && x.getChannelGroup().intValue() == channelGroup))
					.map(channel -> channel.getChannelCode().toString()).collect(Collectors.toSet()));
			lastSelectChannel = channelGroup;
		}
	}

	public void onSelectedAllApiFicoTag(){
		List<String> apiFicoTags = loanApiFicoTagRecordService.findUserTags().stream().map(LoanProductUserTag::getValue).collect(Collectors.toList());
		if(CollectionUtils.isEmpty($.getSelectedApiFicoTags()) || $.getSelectedApiFicoTags().size() < apiFicoTags.size()){
			$.setSelectedApiFicoTags(apiFicoTags);
		}else{
			$.getSelectedApiFicoTags().clear();
		}

	}

	private void fillProductWelfareTopic() {
		// 专题
		List<LoanProductTopic.LoanTopicInfo> topicInfos = loanProductSpaceService.findAllByType(2).stream().filter(x -> StringUtils.isNotBlank(x.getDetails())).filter(x -> {
			SpaceDetails details = new Gson().fromJson(x.getDetails(), SpaceDetails.class);
			// 福利专题
			if ("2".equals(details.getType())) {
				return true;
			}
			return false;
		}).map(x -> {
			LoanProductTopic.LoanTopicInfo topicInfo = new LoanProductTopic.LoanTopicInfo();
			topicInfo.setTopicId(x.getId());
			topicInfo.setName(x.getName());
			return topicInfo;
		}).collect(Collectors.toList());

		for (LoanProductTopic.LoanTopicInfo productTopicInfo : $.getLoanProductTopic().getTopicInfos()) {
			for (int i = 0; i < topicInfos.size(); i++) {
				LoanProductTopic.LoanTopicInfo topicInfo = topicInfos.get(i);
				if (productTopicInfo.getTopicId().equals(topicInfo.getTopicId())) {
					topicInfos.remove(topicInfo);
					i--;
				}
			}
		}

		$.getLoanProductTopic().getTopicInfos().addAll(topicInfos);
	}

	public void onEditTopicInfo(Long id) {
		$.getLoanProductTopic().getTopicInfos().stream().filter(topicInfo -> topicInfo.getTopicId().equals(id)).findFirst().ifPresent(topicInfo -> productTopic = topicInfo);
	}

	public void onResetTopicInfo() {
		productTopic.setBottomButtonContent(null);
		productTopic.setBottomButtonType(null);
		productTopic.setProductDesc(null);
		productTopic.setRecommendImg(null);
	}

	public void onUploadTopicImg(FileUploadEvent event) {
		productTopic.setRecommendImg(this.uploadImg(event.getFile()));
	}

	public void onSaveTopicInfo() {
		if (null != productTopic.getTopicId()) {
			$.getLoanProductTopic().getTopicInfos().stream().filter(topicInfo -> topicInfo.getTopicId().equals(productTopic.getTopicId())).findFirst()
					.ifPresent(topicInfo -> $.getLoanProductTopic().getTopicInfos().remove(topicInfo));
		}
		$.getLoanProductTopic().getTopicInfos().add(productTopic);
		execute("PF('topicDialog').hide();");
	}

	private int updateCount = 0;

	public void onChangeTab(TabChangeEvent event) {
		if (0 == updateCount && "广告位配置".equals(event.getTab().getTitle())) {
			updateCount++;
			update("productInfoForm:tabView:isAlternate");
		}
	}

	public boolean validationModelContent() {
		List<LoanProductModelView> loanProductModelViews = $.getLoanProductModelViews();

		if($.getProductType() == null || !$.getProductType().equals(2)){

			if (CollectionUtils.isNotEmpty(loanProductModelViews)){
				for (LoanProductModelView modelViews : loanProductModelViews){
					if (modelViews.getType() == 0){
						if (StringUtils.isEmpty(modelViews.getText())){
							addErrorMessage(modelViews.getLabel()+"不能为空");
							return false;
						}
					}
					if (modelViews.getType() == 1){
						if (StringUtils.isEmpty(modelViews.getImgUrl())){
							addErrorMessage(modelViews.getLabel()+"不能为空");
							return false;
						}
					}
					if (modelViews.getType() == 2){
						if (StringUtils.isEmpty(modelViews.getImgText()) || StringUtils.isEmpty(modelViews.getImgText())){
							addErrorMessage(modelViews.getLabel()+"不能为空");
							return false;
						}
					}
					if (modelViews.getType() == 3){
						if (null == modelViews.getDate()){
							addErrorMessage(modelViews.getLabel()+"不能为空");
							return false;
						}
					}
					if (modelViews.getType() == 4){
						if (null == modelViews.getIsTrue()){
							addErrorMessage(modelViews.getLabel()+"不能为空");
							return false;
						}
					}
					if (modelViews.getType() == 5){
						if (CollectionUtils.isEmpty(modelViews.getOneListObjects())){
							addErrorMessage(modelViews.getLabel()+"不能为空");
							return false;
						}
					}
				}
			}
		}
		return true;
	}

	public boolean validation() {

		if(StringUtils.isBlank($.getName())){
			addErrorMessage("甲方名称不能为空");
			return false;
		}
		if(StringUtils.isBlank($.getCooperativeOrganization())){
			addErrorMessage("合作机构不能为空");
			return false;
		}

		//甲方类型不等于增值服务类型甲方，才校验贷款产品的配置
		if($.getProductType() == null || !$.getProductType().equals(2)){

			if(null == $.getRateType()){
				addErrorMessage("利率模式不能为空");
				return false;
			}
			if(StringUtils.isBlank($.getRate())){
				addErrorMessage("参考利率不能为空");
				return false;
			}
			if(null == $.getMinTerm()){
				addErrorMessage("最低借款期限不能为空");
				return false;
			}
			if(null == $.getMaxTerm()){
				addErrorMessage("最长借款期限不能为空");
				return false;
			}
			if(null == $.getMinLimit()){
				addErrorMessage("最低借款额度不能为空");
				return false;
			}
			if(null == $.getMaxLimit()){
				addErrorMessage("最高借款额度不能为空");
				return false;
			}
			if(null == $.getAveragePrice()){
				addErrorMessage("件均价不能为空");
				return false;
			}

			if(null == $.getRepayType()){
				addErrorMessage("还款方式不能为空");
				return false;
			}

			if(null == $.getSuccessCount()){
				addErrorMessage("申请人数不能为空");
				return false;
			}
			if(StringUtils.isBlank($.getLendDate())){
				addErrorMessage("最快放款时间不能为空");
				return false;
			}
			if(null == $.getPassRate()){
				addErrorMessage("审核通过率不能为空");
				return false;
			}
			if(null == $.getLastweekPassRate()){
				addErrorMessage("上周审核通过率不能为空");
				return false;
			}
			if(null == $.getPlatformScore()){
				addErrorMessage("平台综合分不能为空");
				return false;
			}
			if(StringUtils.isEmpty($.getActivityName())){
				addErrorMessage("模板名称不能为空");
				return false;
			}

		}

		if(StringUtils.isBlank($.getLogo())){
			addErrorMessage("产品logo图不能为空");
			return false;
		}

		if(StringUtils.isBlank($.getSummary())){
			addErrorMessage("活动描述不能为空");
			return false;
		}
		if(null == $.getAdvantage() || $.getAdvantage().size() <= 0){
			addErrorMessage("产品优势不能为空");
			return false;
		}

		if (CollectionUtils.isEmpty($.getSelectedPlatforms())){
			addErrorMessage("平台不能为空");
			return false;
		}
		if ($.getRedirectType() == null){
			addErrorMessage("跳转类型不能为空");
			return false;
		}
		if ($.getOpenType() == null){
			addErrorMessage("打开方式不能为空");
			return false;
		}
		if ($.getRecommendType() == null){
			addErrorMessage("推荐池类型不能为空");
			return false;
		}
		if (StringUtils.isEmpty($.getParentProd())){
			addErrorMessage("所属大产品不能为空");
			return false;
		}
		if (null == $.getDayLimitClickUv()) {
			addErrorMessage("总控量不能为空");
			return false;
		}

		if($.getUvValue() == null){
			addErrorMessage("UV价值不能为空");
			return false;
		}

		if($.getOnlineRule() == null && CollectionUtils.isEmpty($.getOnlineRule().getDevice())){
			addErrorMessage("设备限制不能为空");
			return false;
		}

		return true;
	}

    public void onAddRecharge(){
        newRecharge = new LoanProductRechargeRecordView();
		addRechargeRecord = true;
        update("productInfoForm:recharge-model");
    }

    public synchronized void onSaveRecharge(){
		if (!addRechargeRecord){
			return;
		}
		if (newRecharge.getAmount() !=null && newRecharge.getAmount() > 0){
			if ($.getNewRechargeRecordList() == null){
				$.setNewRechargeRecordList(new ArrayList<>());
			}
			Timestamp timestamp = new Timestamp(new Date().getTime());
			newRecharge.setCreator(CurrentUser.get().getName());
			newRecharge.setCreate_time(timestamp);
			$.getNewRechargeRecordList().add(newRecharge);
			LoanProductRechargeRecord rechargeRecord = new LoanProductRechargeRecord();
			try {
				BeanUtils.copyProperties(rechargeRecord, newRecharge);
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			} catch (InvocationTargetException e) {
				e.printStackTrace();
			}
			rechargeRecord.setCreate_time(timestamp);
			rechargeRecordList.add(rechargeRecord);
			addRechargeRecord = false;
			update("productInfoForm");
		}else{
			addErrorMessage("充值金额不正确");
		}
    }

    public void onChangePrepaySwitch(){
//		System.out.println($.getPrepayOffLine());
	}

	@Override
	protected List<String> getDictionaryCodes() {
		return Lists.newArrayList(FIRST_PARTY_LOAN_TYPE, APPROVAL_TYPE, CREDIT_CARD_TAG, IDENTITY_TAG, LOAN_NECESSARY_DATA, PROMOTION_TYPE, RATE_TYPE, UNION_INFO, UNION_SERIAL,
				API_SERIAL, PLATFORM, THIRD_PARTY_LONG_TAG, HIT_LIBRARY, UNION_SERIAL, TOPIC_BOTTOM_TYPE, PRODUCT_TYPE, BLACK_LIST_TYPE, RECOMMEND_POOL_TYPE,LARGE_COMMON_PRODUCT,CUSTOMER_SERVICE_TYPE,ALL_SERIAL,NEW_COLLISION_API_ID,COOPERATIVE_ORGANIZATION);
	}

	@Data
	public static class ActivityModelRequest {
		private Long activityModelId;
		private Long contentActivityId;
	}
}